-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teensy Compatibility #142
base: master
Are you sure you want to change the base?
Teensy Compatibility #142
Conversation
…lues that contain the = character.
…ility with windows drive references containing colons.
…uding regex symbols. Swapped second regex match for SUBSTRING.
…s using LOADER option Added: print_teensy_modes(board_id) to list available modes Added: print_teensy_modes(board_id MODE mode_id) to list specific modes options Added: Detection of the Teensy SDK (loader specifically) on initialisation Added: Ability for Teensy mode options (speed, keys, usb) to be set in configuration, as comparable with Arduino IDE options for Teensy. Added: Support for missing build option flags (<board_id>.build.optionX) required for Teensy.
Added: Documentation to readme for teensy compatibility
What about this PR? would really like see it merged. |
@filosganga iirc I ran into some problems with this and compiling out to Teensy 3. |
thanks |
For what it's worth to anyone else who happens across this PR, I've abandoned trying to make this work in favor of using PlatformIO for the same cross-OS compiling. Will leave this PR open, but I now feel it's incomplete. I'll leave it up to the project maintainer to decide its fate. |
Following on from issue #67, this PR adds support for Teensy boards and the Teensy SDK for arduino-cmake.
The crux of this PR is adding additional compile options and detecting/using teensy_loader_cli (halfkay) over avrdude for uploading.
Teensy-specific board modes that are available (usually
speed
,usb
andkeys
) can be listed using the following command:print_teensy_modes(board_id)
where board_id is the specific Teensy board identifier.The options available for each mode can be viewed using:
print_teensy_modes(board_id MODE mode_id)
where mode_id is the mode (eg.speed
) you want to view options for.Three specific options must be set for the Teensy board to compile correctly:
set(TEENSY_CPU_F_MODE 16)
set(TEENSY_USB_MODE serial)
set(TEENSY_KEYBOARD_MODE en-us)
If the Teensy board is detected (usually specified in the Teensy boards.txt config via the
<board_id>.upload.protocol
value ashalfkay
), the teensy_loader_cli will be used. All other options (or null) default to avrdude, as before.Some additional support for teensy-specific build flags has been added, allowing
<board_id>.build.optionX
definitions to be imported from the the boards.txt file as compile flags.Failing to define a F_CPU will now also raise a fatal error. This is a common hiccup when trying to set up arduino-cmake with a Teensy.
Requires (and integrates) PRs #141 and #140.
Please note I only have a Teensy, so I haven't been able to thoroughly test this against standard arduino boards.